K2 compatibility - #92
Merged
Merged
Conversation
faogustavo
reviewed
Aug 14, 2026
faogustavo
reviewed
Aug 14, 2026
There was a problem hiding this comment.
Pull request overview
Updates the project’s build/tooling and multiplatform source declarations to ensure Kotlin 2.x consumers can link the published klib without IrLinkageError (issue #85), primarily by rebuilding with Kotlin 2.x and adjusting Kotlin Gradle plugin APIs for K2.
Changes:
- Upgraded Gradle wrapper and version catalog to Kotlin
2.2.10, AGP8.10.0, and AndroidcompileSdk/targetSdk35. - Updated
expect/actualdeclarations for Bugsnag/Crashlytics call wrappers and migrated iOS linker plugins tocompilerOptions/compileTaskProviderconfiguration. - Simplified Apple
ThreadSafeVarimplementation and updated repo hygiene (.kotlin/in.gitignore), plus minor settings/module include adjustments.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
settings.gradle.kts |
Adjusts included projects and keeps toolchain resolver plugin configuration. |
gradle/wrapper/gradle-wrapper.properties |
Bumps Gradle wrapper to a newer version for Kotlin/AGP compatibility. |
gradle/libs.versions.toml |
Upgrades Kotlin/AGP and Android SDK levels in the version catalog. |
build.gradle.kts |
Updates root plugin application set (notably removes Docusaurus template plugin). |
crashlytics/src/commonMain/kotlin/co/touchlab/crashkios/crashlytics/CrashlyticsCalls.kt |
Makes expect API explicit to align with K2 expect/actual resolution. |
crashlytics/src/appleMain/kotlin/co/touchlab/crashkios/crashlytics/CrashlyticsCallsActual.kt |
Adds actual modifiers to match new expect declarations. |
crashlytics/src/androidMain/kotlin/co/touchlab/crashkios/crashlytics/CrashlyticsCallsActual.kt |
Adds actual modifiers to match new expect declarations. |
crashlytics/build.gradle.kts |
Removes per-module KotlinCompile jvmTarget configuration (leans on existing compilerOptions/AGP config). |
crashlytics-ios-link/src/main/kotlin/co/touchlab/crashkios/CrashlyticsLinkPlugin.kt |
Migrates linker args wiring to compileTaskProvider + compilerOptions. |
crashlytics-ios-link/build.gradle.kts |
Simplifies plugin build by relying on kotlin-dsl rather than kotlin("jvm"). |
bugsnag/src/commonMain/kotlin/co/touchlab/crashkios/bugsnag/BugsnagCalls.kt |
Makes expect API explicit to align with K2 expect/actual resolution. |
bugsnag/src/appleMain/kotlin/co/touchlab/crashkios/bugsnag/BugsnagCallsActual.kt |
Adds actual modifiers to match new expect declarations. |
bugsnag/src/androidMain/kotlin/co/touchlab/crashkios/bugsnag/BugsnagCallsActual.kt |
Adds actual modifiers to match new expect declarations. |
bugsnag/build.gradle.kts |
Removes per-module KotlinCompile jvmTarget configuration (leans on existing compilerOptions/AGP config). |
bugsnag-ios-link/src/main/kotlin/co/touchlab/crashkios/BugsnagLinkPlugin.kt |
Migrates linker args wiring to compileTaskProvider + compilerOptions. |
bugsnag-ios-link/build.gradle.kts |
Simplifies plugin build by relying on kotlin-dsl rather than kotlin("jvm"). |
core/src/appleMain/kotlin/co/touchlab/crashkios/core/ThreadSafeVar.kt |
Removes strict-memory-model freezing logic for modern Kotlin/Native behavior. |
core/build.gradle.kts |
Removes per-module KotlinCompile jvmTarget configuration (leans on existing compilerOptions/AGP config). |
.gitignore |
Ignores .kotlin/ build cache directory. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
faogustavo
approved these changes
Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
IrLinkageErroron Kotlin 2.x consumers (see #85). It was compiled with Kotlin 1.6.20, which baked an old IR symbol hash forsetUnhandledExceptionHookinto the klib. Kotlin 2.x consumer can't resolve that symbol, so the stub throwsIrLinkageError.